package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.ExpenditureRecord;
import com.sc.nft.entity.vo.ExpenditureRecordVO;
import com.sc.nft.entity.vo.MerchantViewBillVO;
import com.sc.nft.enums.ExpenditureRecordTypeEnum;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * (sc_expenditure_record)数据Mapper
 *
 * @author Sun
 * @since 2022-09-07 12:59:34
 * @description 由 Mybatisplus Code Generator 创建
*/
@Mapper
public interface ExpenditureRecordMapper extends BaseMapper<ExpenditureRecord> {

    Page<ExpenditureRecordVO> getExpenditureRecord(@Param("userId") Long userId, @Param("calendar") String calendar, Page page, @Param("typeList") List typeList);

    Boolean saveBatch(@Param("list") List<ExpenditureRecord> expenditureRecords);

    Page<MerchantViewBillVO> merchantViewBill(@Param("userId") Long userId, @Param("startTime") Date startTime , @Param("endTime") Date endTime,  Page page, @Param("type") Integer type);
}
